{% extends 'base.html' %}
{% load customer_tags %}
{% block title %}{{ section }}页{% endblock %}
{% block section %}{{ section }}{% endblock %}
{% block content %}
    <form class="forms-sample" method="post">
        {% csrf_token %}
                  <div class="form-group row">
                    <label for="exampleInputUsername2" class="col-sm-3 col-form-label">身份证</label>
                    <div class="col-sm-5">
                      <input type="text" class="form-control" id="exampleInputUsername2" placeholder="请输入身份证号码" name="num" value={{ student.detail.num }}>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label for="exampleInputEmail2" class="col-sm-3 col-form-label">姓名</label>
                    <div class="col-sm-5">
                      <input type="text" name="name" value="{{ student.name }}" class="form-control" id="exampleInputEmail2" placeholder="请输入姓名">
                    </div>
                  </div>
                  <div class="form-group row">
                    <label for="age" class="col-sm-3 col-form-label">年龄</label>
                    <div class="col-sm-5">
                      <input type="text" name="age" value="{{ student.age }}" class="form-control" id="age" placeholder="请输入年龄">
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-3 col-form-label">性别</label>
                    <div class="col-sm-2">
                      <div class="form-check">
                        <label class="form-check-label">
                          <input type="radio" class="form-check-input" name="sex" id="membershipRadios1"
                                 value="0" {% if student.sex == 0 %}checked{% endif %}>
                          女
                          <i class="input-helper"></i></label>
                      </div>
                    </div>
                    <div class="col-sm-2">
                      <div class="form-check">
                        <label class="form-check-label">
                          <input type="radio" class="form-check-input" name="sex" id="membershipRadios2"
                                 value="1" {% if student.sex != 0 %}checked{% endif %}>
                          男
                          <i class="input-helper"></i></label>
                      </div>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label for="exampleInputPassword2" class="col-sm-3 col-form-label">QQ号码</label>
                    <div class="col-sm-5">
                      <input type="text" name="QQ" value="{{ student.qq }}" class="form-control" id="exampleInputPassword2" placeholder="请输入QQ号码">
                    </div>
                  </div>
                  <div class="form-group row">
                    <label for="exampleInputConfirmPassword2" class="col-sm-3 col-form-label">电话号码</label>
                    <div class="col-sm-5">
                      <input type="text" name="phone" value="{{ student.phone }}" class="form-control" id="exampleInputConfirmPassword2"
                             placeholder="请输入电话号码">
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-3 col-form-label">班级</label>
                    <div class="col-sm-5">
                    {#   下拉框 #}
                        {% grade_options student %}
                    </div>
                  </div>
                  <div class="form-group row">
                    <label for="college" class="col-sm-3 col-form-label">毕业院校</label>
                    <div class="col-sm-5">
                      <input type="text"  name="college"  class="form-control" value="{{ student.detail.college }}"
                              id="college" placeholder="请输入毕业院校">
                    </div>
                  </div>
                    {% if section == '学生详情' %}
                        <a class="btn btn-primary me-2" href="{% url 'students:list' %}">返回</a>
                    {% else %}
                  <button type="submit" class="btn btn-primary me-2">提交</button>
                  <button type="reset" class="btn btn-light">重置</button>
                    {% endif %}
                </form>
{% endblock %}


